{% extends "base.html" %}

{% block headtitle %}Home{% endblock %}

{% block header_scripts %}
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript" src="/m/js/ecm_lib.js"></script>
<script type="text/javascript" src="/m/js/ecm_pie_chart.js"></script>

<script type="text/javascript">
const DISTRIBUTION = {{ distribution|safe }};
const DIRECTOR_ACCESS_LVL = {{ directorAccessLvl }};
</script>
{% endblock %}

{% block breadcrumbs %}
<li><a href="/">Home</a></li>
{% endblock %}

{% block main_content %}

<h1 class="pagetitle">{{ corp_name }} <span class="time">- EVE Corporation Management</span></h1>

<div id="distibution_chart"></div>
<script type="text/javascript" src="/m/js/access_distribution_chart.js" ></script>

<table class="transparent" >
  <tbody>
    <tr>
      <td>
        <h1><a href="/members/history">Last Member Moves</a></h1>
        <ul>
        {% for m in last_member_changes %}
          <li class="{% if m.new %}green{% else %}red{% endif %}">
                               {{ m.as_html|safe }}
            {% if m.nickname %}<span class="italic"> ({{ m.nickname|truncatewords:"5" }})</span>{% endif %}
                               <span class="time"> - {{ m.date_str }}</span></li>
        {% endfor %}
        </ul>
      </td>
      <td>
        <h1><a href="/members/access_changes">Last Access Changes</a></h1>
        <ul>
        {% for change in last_access_changes %}
          <li class="{% if change.new %}green{% else %}red{% endif %}">
                               {{ change.member_as_html|safe }}
                               <span> {% if change.new %}got{% else %}lost{% endif %} </span>
                               {{ change.access_as_html|safe }}
                               <span class="time"> - {{ change.date_str }}</span></li>
        {% endfor %}
        </ul>
      </td>
    </tr>
  </tbody>
</table>

{% endblock %}
